<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Unsubscribe Recipient</title>

    <link href="{views_url}css/styles.css" rel="stylesheet" type="text/css"/>
    <style>
      body { background: none; padding: 1em; }
    </style>

    <script src="{views_url}js/lib/jquery.1.7.1.min.js"></script>
    
    <script>
      jQuery(document).ready(function(){
        jQuery('#clearall').on('click',function(event){
          event.preventDefault();
          jQuery('input[type=checkbox]').attr('checked',false);
        });
      });
    </script>
  </head>

  <body>

    <h1>{$recipient->client->name}</h1>
    <h2>Página de configuración</h1>
    <p>Actualmente te encontras inscripto en las siguientes listas:</p>

    <form action="{controllers_url}recipients/unsubscribe_do/" method="post" enctype="multipart/form-data">
      <input name="recipient_id" type="hidden" value="{$recipient->id}" />

      <div class="control-group">
      {foreach from=$recipient_catalogs item="catalog"}
        <label class="checkbox" for="catalog-{$catalog->id}">
          <input id="catalog-{$catalog->id}" name="catalogs[]" type="checkbox" value="{$catalog->id}" checked /> {$catalog->name}
        </label>
      {/foreach}
      </div>

      <div class="control-group">
        <a id="clearall" class="btn" href="#"><i class="icon-ban-circle"></i> Desmarcar Todas</a>
      </div>

      <div class="control-group">
        <button type="submit" class="btn btn-primary" name="button_save"><i class="icon-ok icon-white"></i> Guardar Datos</button>
      </div>

    </form>

  </body>
</html>